package com.tjh.gulimall.product.dao;

import com.tjh.gulimall.product.entity.AttrAttrgroupRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 属性&属性分组关联
 * 
 * @author tjh
 * @email tjh@qq.com
 * @date 2022-09-28 15:38:32
 */
@Mapper
public interface AttrAttrgroupRelationDao extends BaseMapper<AttrAttrgroupRelationEntity> {

    /**
     * delete from pms_attr_attrgroup_relation
     * where (attr_id = 1 and attr_group_id = 1) OR (attr_id = 1 and attr_group_id = 2) ...
     * @param entities
     */
    void deleteBatchRelation(@Param("entities") List<AttrAttrgroupRelationEntity> entities);
}
